home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01a.txt / 000063_icon-group-sender _Mon Jun 19 12:22:29 2000.msg < prev    next >
Internet Message Format  |  2002-01-03  |  4KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA10487
  4.     for icon-group-addresses; Mon, 19 Jun 2000 12:20:34 -0700 (MST)
  5. Message-Id: <200006191920.MAA10487@baskerville.CS.Arizona.EDU>
  6. From: Lloyd Uhler <luhler@excel.com>
  7. To: "'icon-group@cs.arizona.edu'" <icon-group@optima.CS.Arizona.EDU>
  8. Subject: RE: Questions on ICON
  9. Date: Mon, 19 Jun 2000 10:10:01 -0500
  10. Errors-To: icon-group-errors@optima.CS.Arizona.EDU
  11. Status: RO
  12. Content-Length: 3703
  13.  
  14. Any fix for textbox input in VIB?
  15.  
  16. Thanks.
  17.  
  18. > -----Original Message-----
  19. > From:    Lloyd Uhler 
  20. > Sent:    Wednesday, April 26, 2000 8:52 AM
  21. > To:    'icon-group@cs.arizona.edu'
  22. > Subject:    Questions on ICON
  23. > 1) For Version 9.3.1 on WIN NT and WIN 98, textbox input does not work for
  24. > VIB generated code as follows:
  25. > ##########################################################################
  26. > ##
  27. > #
  28. > #    File:     C:\Icon9.3\vib_tst.icn
  29. > #
  30. > #    Subject:  Program to ...
  31. > #
  32. > #    Author:   
  33. > #
  34. > #    Date:     January 21, 1999
  35. > #
  36. > ##########################################################################
  37. > ##
  38. > #
  39. > #
  40. > #
  41. > ##########################################################################
  42. > ##
  43. > #
  44. > #  Requires:
  45. > #
  46. > ##########################################################################
  47. > ##
  48. > #
  49. > #  Links: vsetup
  50. > #
  51. > ##########################################################################
  52. > ##
  53. > #  This vib interface specification is a working program that responds
  54. > #  to vidget events by printing messages.  Use a text editor to replace
  55. > #  this skeletal program with your own code.  Retain the vib section at
  56. > #  the end and use vib to make any changes to the interface.
  57. > link vsetup
  58. > procedure main(args)
  59. >    local vidgets, root, paused
  60. >    (WOpen ! ui_atts()) | stop("can't open window")
  61. >    vidgets := ui()                # set up vidgets
  62. >    root := vidgets["root"]
  63. >    paused := 1                    # flag no work to do
  64. >    repeat {
  65. >       # handle any events that are available, or
  66. >       # wait for events if there is no other work to do
  67. >       while (*Pending() > 0) | \paused do {
  68. >          ProcessEvent(root, QuitCheck)
  69. >          }
  70. >       # if <paused> is set null, code can be added here
  71. >       # to perform useful work between checks for input
  72. >       }
  73. > end
  74. > procedure text_input_cb1(vidget, value)
  75. > #    write("value = ", value)
  76. >    return
  77. > end
  78. > #===<<vib:begin>>===    modify using vib; do not remove this marker line
  79. > procedure ui_atts()
  80. >    return ["size=600,378", "bg=#C0C0C0"]
  81. > end
  82. > procedure ui(win, cbk)
  83. > return vsetup(win, cbk,
  84. >    [":Sizer:::0,0,600,378:",],
  85. >    ["button1:Button:regular::270,349,32,20:OK",button_cb1],
  86. >    ["text_input1:Text::46:95,111,367,20:Enter Your
  87. > Name:\\=",text_input_cb1],
  88. >    )
  89. > end
  90. > #===<<vib:end>>===    end of section maintained by vib
  91. > procedure button_cb1(vidget, value)
  92. > #
  93. > #  write("button_cb1")
  94. > #
  95. > # This does not work with the original viface module
  96. > # The local one has been revised to detect Window closure
  97. > # and do this without error. This will return to the statement
  98. > # after GetEvents. The program can then process or do what it
  99. > # needs with the results for the GUI data capture. Data values
  100. > # can be inserted into global variables so they are available
  101. > # to the rest of the program.
  102. > #
  103. > #  WClose( &window )
  104. >   return
  105. > end
  106. > 2) There seems to be no way to gather a set of file names from a specified
  107. > directory:
  108. >     (System & popen do not work the same as command-line version of ICON
  109. > (Nticont, Nticonx)).
  110. >     (F.F and pipe.001 are empty)
  111. >  link graphics, dialog, popen, xio
  112. >  procedure main()
  113. > #
  114. > #
  115. > # the 45 is the width
  116. > #
  117. >   txt := TextDialog("Specify Directory Path:",  "Path", "C:\\temp" , 45)
  118. >   Path := dialog_value[1]
  119. >   write("Path = ", Path)
  120. >   cmd := "Dir /b/l "
  121. > #
  122. > # See if F.F Generated fro BAT File
  123. > #
  124. >   system( "CALL C:\\ICON9.3\\WDIR.CMD" || Path )
  125. > #
  126. > # Try popen to get file of file names
  127. > #
  128. >   fin := popen( cmd || Path, "r")
  129. >   while line := trim(read(fin)) do write(line)
  130. >   pclose(fin)
  131. >  end
  132. > REM
  133. > REM Wdir.BAT
  134. > REM
  135. > REM Purpose: Directory Listing
  136. > REM
  137. > DIR /b/l %1 > F.F
  138.